<dom-module id='gerrit-bluestyle-ui'>
  <!--
  Copyright (C) 2019 The Android Open Source Project
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->
  <script>
    'use strict';
    Gerrit.install(plugin => {
      plugin.registerStyleModule('app-theme', 'gerrit-eclipsestyle');

      const domHook = plugin.hook('header-title');
      domHook.onAttached(element => {
        let img = document.createElement('img');
        img.setAttribute('src', '')
        img.style.cssText = 'height: 26px; padding-right: 15px; vertical-align:middle ';
        element.prepend(img);

        let title = document.createElement('span');
        title.append('Gerrit');
        title.style.cssText = 'font-weight: bold';
        element.append(title);
      });
    });
  </script>
</dom-module>
<dom-module id='gerrit-eclipsestyle'>
  <template>
    <style>
      html {
        --header-background-color: rgb(59,120,231);
        /*--header-box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.2);*/
        --header-text-color: rgb(255,255,255);
        --header-title-font-size: 1.8rem;
        --header-title-content: '';
        --header-padding: 5px 5px 5px 15px;
        --header-border-bottom: 0;
      }
    </style>
  </template>
</dom-module>
